﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Actuals.CoreDomain.Business;
using Actuals.Data;
using Actuals.CoreDomain;
using Actuals.CoreDomain.Data;

namespace ActualsBusiness
{
    public class BusinessPassword : IBusinessPassword
    {


        #region IBusinessPassword Members



        public string EncryptPassword(string password)
        {
            System.Security.Cryptography.MD5CryptoServiceProvider x = new System.Security.Cryptography.MD5CryptoServiceProvider();
            byte[] data = System.Text.Encoding.ASCII.GetBytes(password);
            data = x.ComputeHash(data);
            String md5Hash = System.Text.Encoding.ASCII.GetString(data);

            return md5Hash;
        }

        #endregion
    }
}
